home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / varie / charmap / install english < prev    next >
Encoding:
Text File  |  1992-12-04  |  7.9 KB  |  252 lines

  1. ; $VER:Installation script for CharMap
  2. ; Author: Adapted from Michael Link's script
  3. ; Begin       : 19/11/99
  4.  
  5. ; Let's begin with the installer script's messages:
  6. (set DIRHELP (cat "You must enter the name of the directory, in which\n"
  7.           @app-name " shall be installed.\n\n"
  8.           "If you want CharMap to be active everytime you\n"
  9.           "start the computer, enter the directory\n"
  10.           "\"SYS:WBStartup\", which is the default directory.\n"
  11.           "You can enter \"SYS:Tools/Commodities\", if you want to\n"
  12.           "use it just sometimes or start it from user-startup.\n"
  13.          )
  14. )
  15.  
  16. (set M_WELCOME    (cat    "Welcome to the installation of " @app-name "v1.4. This little\n"
  17.             "tool can display all the characters of a given font."
  18.     )
  19. )
  20.  
  21. (set CHARSET_HELP (cat    "The charset indicates how many characters will be displayed\n"
  22.             "at startup, among:\n"
  23.             "   · Défault: The charset used is adjusted to the one the font uses\n"
  24.             "   · 8bits ASCII: All characters, from 0 to 255\n"
  25.             "   · ISO Latin1: The characters from 32 to 255 only\n"
  26.             "   · Amiga standard: Like ISO Latin1, without the chars from 127 to 159\n"
  27.             "\n\nActually, some fonts (XHelvetica, and so on...) define all\n"
  28.             "possible chars between 0 and 255, but only those definied in\n"
  29.             "the Amiga standard have a meaning graphical symbol. That's why\n"
  30.             "it could be interesting to force the charset to display at\n"
  31.             "startup."
  32.     )
  33. )
  34.  
  35. (set GEOMETRY_HELP (cat "This tool-type defined the position of the main and minimized\n"
  36.             "window. It represents a comma separated list of signed numbers.\n"
  37.             "The first two, correspond to the position of the main window, and\n"
  38.             "the next two, to the minimized one. If nothing is given, the\n"
  39.             "position will be centered on screen. Negative values can be\n"
  40.             "enterred, in such case, position is relative to the opposite\n"
  41.             "border is usually refers to."
  42.     )
  43. )
  44.  
  45. (set STARTUP_HELP  (cat    "You can launch this tool directly from the user-startup.\n"
  46.             "In such case, an entry like this this will be inserted:\n"
  47.             "; BEGIN " @app-name "\n"
  48.             "Run >NIL: " @app-name " CX_POPUP=NO ...\n"
  49.             "Parameters will be those you will enterred.\n"
  50.             "you can use a automatic launch by placing the programme\n"
  51.             "and it's icon in the WBStartup drawer of the boot disk, or\n"
  52.             "at last if you want to use it just sometimes, place it in\n"
  53.             "another drawer, like C: or SYS:Tools/Commodities."
  54.     )
  55. )
  56.  
  57. (set WHICH_STARTUP    "How do you want to start this commodity?")
  58.  
  59. (set WHICH_CHARSET    "Which charset would you like to display at start?")
  60.  
  61. (set WHICH_GEOMETRY    "What will be the initial position of the windows?")
  62.  
  63. (set WHICH_CATALOG    "\nWhich language do you want to install ? (in LOCALE:)\n")
  64.  
  65. (set DIR_REQUEST (cat    "Please enter the destination directory for " @app-name ))
  66.  
  67. (set WHICH_HOTKEY (cat    "\n\nWith which key combination shall the\n"
  68.             "window be reopen when it is hiden ?"
  69.     )
  70. )
  71.  
  72. (set MSG_COPYLANG    "Copying catalog ")
  73.  
  74. ; Default values:
  75. (set DEF_DESTDIR    "SYS:WBStartup")
  76. (set DEF_HOTKEY        "ctrl lalt c")
  77. (set DEF_GEOMETRY    ",,,")
  78. (set DEF_CHARSET    "0")
  79.  
  80. (set vernum (getversion "locale.library" (resident)))
  81. (set ver (shiftright vernum 16))
  82.  
  83. ;
  84. ; Here is the screen where the user's skill is controlled:
  85. ;
  86.  
  87. (welcome M_WELCOME)
  88.  
  89. ; ***********************************************************************
  90. ; *                                                                     *
  91. ; * Request for the destination file (usually user-startup)             *
  92. ; *                                                                     *
  93. ; ***********************************************************************
  94.  
  95. ; Only for expert!
  96. (if (< @user-level 2)
  97.     (set AUTO 0)
  98. (    (set DF_BITS (askchoice (prompt WHICH_STARTUP)
  99.                 (help STARTUP_HELP)
  100.                 (choices "User-Startup"
  101.                      "WBStartup drawer"
  102.                      "Other directory")
  103.                 (default 0)
  104.              )
  105.     )
  106.     ; Place the prog. automatically in WBStartup drawer:
  107.     (set AUTO (= DF_BITS 1))
  108.     ; If the user want to launch it from user-startup, install tool in C:
  109.     (if (= DF_BITS 0) (set DEF_DESTDIR "C:"))
  110.     ; If the user doesn't whant to launch at every boot:
  111.     (if (= DF_BITS 2) (set DEF_DESTDIR "SYS:Tools/Commodities"))
  112. ))
  113.  
  114.  
  115. ; ***********************************************************************
  116. ; *                                                                     *
  117. ; * Request for the destination directory                               *
  118. ; *                                                                     *
  119. ; ***********************************************************************
  120.  
  121. ; For novice set directory to WBStartup:
  122. (if (= AUTO 0)
  123.     (if (= @user-level 0)
  124.         (set DIR DEF_DESTDIR)
  125.         (set DIR (askdir (prompt DIR_REQUEST)
  126.                  (help DIRHELP)
  127.                  (default DEF_DESTDIR)
  128.              )
  129.         )
  130.     )
  131.     (set DIR DEF_DESTDIR)
  132. )
  133.  
  134. (set @default-dest DIR)
  135.  
  136.  
  137. ; ***********************************************************************
  138. ; *                                                                     *
  139. ; * Asking for the tool-types                                           *
  140. ; *                                                                     *
  141. ; ***********************************************************************
  142.  
  143. ; * HOTKEY *
  144. (if (= @user-level 0)
  145.     (set HOTKEY DEF_HOTKEY)
  146.  
  147.     (set HOTKEY (askstring    (prompt WHICH_HOTKEY)
  148.                 (help @askstring-help)
  149.                 (default DEF_HOTKEY)
  150.             )
  151.     )
  152. )
  153.  
  154. ; * CHARSET *
  155. (if (= @user-level 0)
  156.     (set CHARSET DEF_CHARSET)
  157.  
  158. (    (set CS_BITS (askchoice (prompt WHICH_CHARSET)
  159.                 (help CHARSET_HELP)
  160.                 (choices "8bits ASCII    (256 characters)"
  161.                      "ISO Latin1     (224)"
  162.                      "Amiga Standard (192)"
  163.                      "Default        (Depends on the font used)")
  164.                 (default 1)
  165.              )
  166.     )
  167.     (if (BITAND CS_BITS 1) (set CHARSET "1"))
  168.     (if (BITAND CS_BITS 2) (set CHARSET "2"))
  169.     (if (BITAND CS_BITS 4) (set CHARSET "3"))
  170.     (if (BITAND CS_BITS 8) (set CHARSET "0"))
  171. ))
  172.  
  173. ; * GEOMETRY (only for expert!) *
  174. (if (< @user-level 2)
  175.     (set GEOMETRY DEF_GEOMETRY)
  176.     (set GEOMETRY (askstring (prompt WHICH_GEOMETRY)
  177.                  (help GEOMETRY_HELP)
  178.                  (default DEF_GEOMETRY)
  179.               )
  180.     )
  181. )
  182.  
  183. (tooltype (prompt "Writing tool-types ...")
  184.       (help)
  185.       (dest @app-name)
  186.       (settooltype "HOTKEY"   HOTKEY)
  187.       (settooltype "CHARSET"  CHARSET)
  188.       (settooltype "GEOMETRY" GEOMETRY)
  189. )
  190.  
  191. (if (= DF_BITS 0)
  192. (    ; The user want to launch it via startup script
  193.     ; Don't copy icon and modify user-startup:
  194.     (copyfiles (prompt (cat "Copying from " @app-name " to " DIR))
  195.            (help @copyfiles-help)
  196.            (source @app-name)
  197.            (dest DIR)
  198.     )
  199.     ; Modify the startup script:
  200.     (set STR_COMMAND (cat "Run >NIL: " @app-name "CX_POPUP=NO CHARSET=" CHARSET " GEOMETRY=" GEOMETRY " HOTKEY=\"" HOTKEY "\"\n"))
  201.     (startup @app-name
  202.         (prompt (cat "Inserting command\n" STR_COMMAND "in S:User-Startup file"))
  203.         (help STARTUP_HELP)
  204.         (command STR_COMMAND)
  205.     )
  206. )
  207.     (copyfiles (prompt (cat "Copying from " @app-name " to " DIR))
  208.            (help @copyfiles-help)
  209.            (source @app-name)
  210.            (dest DIR)
  211.            (infos)
  212.     )
  213. )
  214.  
  215.  
  216. ; ***********************************************************************
  217. ; *                                                                     *
  218. ; * Installation of the catalogs                                        *
  219. ; *                                                                     *
  220. ; ***********************************************************************
  221.  
  222. (if (>= ver 38)
  223.     (
  224.         (set DEF_LANG 0)
  225.     (if (= @language "français") (set DEF_LANG 1))
  226.     (if (= @language "deutsch")  (set DEF_LANG 2))
  227.     (if (= @user-level 0)
  228.         (set CATALOGS (if (= DEF_LANG 0) 0 (shiftleft 1 (- DEF_LANG 1))))
  229.         (set CATALOGS (askoptions (prompt WHICH_CATALOG)
  230.                       (help)
  231.                       (choices "Français" "Deutsch")
  232.                       (default DEF_LANG)
  233.                   )
  234.         )
  235.     )
  236.     (if (BITAND CATALOGS 1)
  237.         (copyfiles (prompt (cat MSG_COPYLANG "French..."))
  238.                    (help)
  239.                    (source "catalogs/français/CharMap.catalog")
  240.                    (dest   "LOCALE:Catalogs/français")
  241.         )
  242.     )
  243.     (if (BITAND CATALOGS 2)
  244.         (copyfiles (prompt (cat MSG_COPYLANG "German..."))
  245.                    (help)
  246.                    (source "catalogs/deutsch/CharMap.catalog")
  247.                    (dest   "LOCALE:Catalogs/deutsch")
  248.         )
  249.     )
  250.     )
  251. )
  252.